regex remove html tags

35

regex remove html tags -

const s = "<h1>Remove all <b>html tags</n></h1>"
s.replace(new RegExp('<[^>]*>', 'g'), '')

regex remove html tags -

String target = someString.replaceAll("<[^>]*>", "");

Comments

Submit
0 Comments